#pragma once

#include "Renderer/FrameBuffer.h"

namespace Orange {
	class OpenGlFrameBuffer : public FrameBuffer
	{
	public:
		OpenGlFrameBuffer(const FrameBufferSpecification& spec);
		~OpenGlFrameBuffer();
		void Bind()  override;
		void UnBind()  override;
		virtual void Resize(uint32_t width, uint32_t height) override;
		virtual const FrameBufferSpecification& GetSpecification() const override {
			return m_Specification;
		};
		virtual const uint32_t GetColorAttachment() const override {
			return m_ColorAttachment;
		};
		virtual void ClearAttachment(int value) override;
		void Invalidate();
	private:
		uint32_t m_RendererId = 0;
		uint32_t m_ColorAttachment = 0;
		uint32_t m_DepthAttachment = 0;
		FrameBufferSpecification m_Specification;
	};


}